package com.xz.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class HelloDao {

	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	public String getName() {
		
		return "Hello";
	}
	
	public Long getUserCount() {
		return jdbcTemplate.queryForObject("SELECT COUNT(1) FROM user",Long.class);
	}
	
}
